home *** CD-ROM | disk | FTP | other *** search
/ Aminet 1 (Walnut Creek) / Aminet - June 1993 [Walnut Creek].iso / usenet / sources / volume89 / comm / amigatcp.p1 < prev    next >
Internet Message Format  |  1989-04-27  |  7KB

  1. Path: xanth!nic.MR.NET!indri!unmvax!tut.cis.ohio-state.edu!bloom-beacon!apple!oliveb!sun!rishathra!page
  2. From: page%rishathra@Sun.COM (Bob Page)
  3. Newsgroups: comp.sources.amiga
  4. Subject: v89i100:  amigatcp - two additional files
  5. Message-ID: <101408@sun.Eng.Sun.COM>
  6. Date: 26 Apr 89 21:48:15 GMT
  7. Sender: news@sun.Eng.Sun.COM
  8. Lines: 185
  9. Approved: page@sun.com
  10.  
  11. Submitted-by: rminnich@super.org (Ronald G. Minnich)
  12. Posting-number: Volume 89, Issue 100
  13. Archive-name: comm/amigatcp.p1
  14.  
  15. These two files were missing from the original distribution.  You
  16. can't re-make the AmigaTCP package without them.
  17.  
  18. # This is a shell archive.
  19. # Remove anything above and including the cut line.
  20. # Then run the rest of the file through 'sh'.
  21. # Unpacked files will be owned by you and have default permissions.
  22. #----cut here-----cut here-----cut here-----cut here----#
  23. #!/bin/sh
  24. # shar: SHell ARchive
  25. # Run the following text through 'sh' to create:
  26. #    devstub.asm
  27. #    version.c
  28. # This is archive 1 of a 1-part kit.
  29. # This archive created: Wed Apr 26 14:43:23 1989
  30. echo "extracting devstub.asm"
  31. sed 's/^X//' << \SHAR_EOF > devstub.asm
  32. X;****************************************************************
  33. X;*                                                            *
  34. X;*                            Stub device driver.                     *
  35. X;*                                                            *
  36. X;*                    Copyright (C) 1986                      *
  37. X;*                     Louis A. Mamakos                       *
  38. X;*                     Software & Stuff                       *
  39. X;*                                                            *
  40. X;*  All rights reserverd.  The program represents propriatary   *
  41. X;*  information of value to the author, and my not be                 *
  42. X;*  reproduced or redistributed in any form include source,   *
  43. X;*  object code or any other representation without prior     *
  44. X;*  permission from the author.                                       *
  45. X;*                                                            *
  46. X;****************************************************************
  47. X;
  48. X;  Assembly language stub for device driver.
  49. X;
  50. X;     FAR     CODE
  51. X;     FAR     DATA
  52. X      CSECT   text
  53. X      XREF    _NetDevOpen,_DevClose,_DevBeginIO       ; external symbols
  54. X      XREF    _DevExpunge,_DevAbortIO         ;_geta4
  55. X      XREF    _nopens
  56. X      XDEF    _DSOpen,_DSClose,_DSAbortIO     ; defined symbols
  57. X      XDEF    _DSBeginIO,_DSExpunge
  58. X      XDEF    _Savea4
  59. X;REGS REG     D1-D7/A0-A6
  60. X;
  61. X;  set up C runtime environment.  This is the Aztec C version.
  62. X;
  63. XCENTRY        MACRO
  64. X      movem.l D2-D7/A2-A6,-(sp)       ;save registers
  65. X      move.l  a4loc,a4        ;get a4
  66. X;     jsr     _geta4
  67. X      ENDM
  68. XCRETURN       MACRO
  69. X      movem.l (sp)+,D2-D7/A2-A6       ;restore registers
  70. X      rts                     ;return to caller
  71. X      ENDM
  72. X;     MACRO   DEBUG
  73. X;     move.l  a6,-(sp)
  74. X;     move.l  _SysBase,a6
  75. X;     jsr     _LVODebug(a6)
  76. X;     move.l  (sp)+,a6
  77. X;     ENDM
  78. X;----------------------------------------------------------------------
  79. X;
  80. X; here begins the system interface commands.  When the user calls
  81. X; Opendevice/Closedevice/Removedevice, this eventually gets translated
  82. X; into a call to the following routines (Open/Close/Expunge).  Exec
  83. X; has already put our device pointer in A6 for us.  Exec has turned
  84. X; off task switching while in these routines (via Forbid/Permit), so
  85. X; we should not take too long in them.
  86. X;
  87. X;----------------------------------------------------------------------
  88. X      ; Open returns the device pointer in d0 if the open
  89. X      ; was successful.  If the open failed then null is returned.
  90. X      ; It might fail if we allocated memory on each open, or
  91. X      ; if only open application could have the device open
  92. X      ; at a time...
  93. X_DSOpen:      ; ( device:a6, unitnum: d0, iob:a1, flags:d1 )
  94. X      CENTRY
  95. X      move.l  a4loc,a4
  96. X      move.l  d1,-(sp)                ; push flags
  97. X      move.l  a1,-(sp)                ; push iob address
  98. X      move.l  d0,-(sp)                ; push unit number
  99. X      move.l  a6,-(sp)                ; device
  100. X      addq.l  #1,_nopens
  101. X      jsr     _NetDevOpen             ; DevOpen(device, iob, unit, flags)
  102. X      lea     16(sp),sp               ; trash paramters
  103. X      CRETURN
  104. X      ; There are two different things that might be returned from
  105. X      ; the Close routine.  If the device is no longer open and
  106. X      ; there is a delayed expunge then Close should return the
  107. X      ; segment list (as given to Init).  Otherwise close should
  108. X      ; return NULL.
  109. X_DSClose:     ; ( device:a6, iob:a1 )
  110. X      CENTRY
  111. X      move.l  a1,-(sp)                ; push iob
  112. X      move.l  a6,-(sp)                ; push device
  113. X      jsr     _DevClose               ; DevClose(device, iob)
  114. X      addq.l  #8,sp                   ; trash parameters
  115. X      CRETURN
  116. X      ; There are two different things that might be returned from
  117. X      ; the Expunge routine.  If the device is no longer open
  118. X      ; then Expunge should return the segment list (as given to
  119. X      ; Init).  Otherwise Expunge should set the delayed expunge
  120. X      ; flag and return NULL.
  121. X      ;
  122. X      ; One other important note: because Expunge is called from
  123. X      ; the memory allocator, it may NEVER Wait() or otherwise
  124. X      ; take long time to complete.
  125. X_DSExpunge:   ; ( device: a6 )
  126. X      CENTRY
  127. X      move.l  a6,-(sp)                ; push device pointer
  128. X      jsr     _DevExpunge             ; DevExpunge(dev)
  129. X      addq.l  #4,sp                   ; pop parameters
  130. X      CRETURN
  131. XNull:
  132. X      moveq.l #0,d0
  133. X      rts
  134. Xa4loc dc.l    0
  135. X_Savea4:
  136. X      move.l  a4,a4loc
  137. X      rts
  138. X;----------------------------------------------------------------------
  139. X;
  140. X; here begins the device specific commands
  141. X;
  142. X;----------------------------------------------------------------------
  143. X_DSBeginIO:   ; ( iob:a1, device:a6 )
  144. X      CENTRY
  145. X      move.l  a6,-(sp)                ; push device
  146. X      move.l  a1,-(sp)                ; push iob
  147. X      jsr     _DevBeginIO             ; DevBeginIO(iob, device)
  148. X      addq.l  #8,sp                   ; pop args
  149. X      CRETURN
  150. X;
  151. X_DSAbortIO:   ; ( iob:a1, device:a6 )
  152. XInvalid:
  153. X      CENTRY
  154. X      move.l  a6,-(sp)                ; push device
  155. X      move.l  a1,-(sp)                ; push iob
  156. X      jsr     _DevAbortIO             ; DevAbortIO(iob, device)
  157. X      addq.l  #8,sp                   ; pop args
  158. X      CRETURN
  159. X      END
  160. SHAR_EOF
  161. echo "extracting version.c"
  162. sed 's/^X//' << \SHAR_EOF > version.c
  163. X/* version control information */
  164. X/* the date of release by N3EUA from distribution central -- DO NOT CHANGE! */
  165. Xchar major_rev[] = "870227";
  166. X/* revision indicator for keeping track of local patches - change this one! */
  167. Xchar minor_rev[] = "5";
  168. SHAR_EOF
  169. echo "End of archive 1 (of 1)"
  170. # if you want to concatenate archives, remove anything after this line
  171. exit
  172.